<?php
namespace api\home\controller;

use think\Db;
use think\Validate;
use cmf\controller\RestBaseController;
use app\common\model\InfoSchoolModel;

class InfoSchoolController extends RestBaseController
{
	
	public function index(){
		$data = InfoSchoolModel::where('content_status',2)
						->where('status',1)
						->where('begin_time','<',time())
						->order('begin_time desc')
						->find();
		if (!empty($data)) {
			$this->success('成功',$data->toArray());
		}else{
			$this->error('失败');
		}
	}
}
